package com.fmjava.service_video.config;

import com.baomidou.mybatisplus.core.injector.ISqlInjector;
import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/*
 *@ClassName AppConfig
 *@Description TODO
 *@Author 吃麻椒的花酱
 *@Date 2021/7/1 22:28
 *@Version 1.0
 */
@Configuration
public class AppConfig {

    /*
     * @author 吃麻椒的花酱
     * @date  2021/7/2 14:50
     * @Description 配置逻辑删除  要加上对应的注解
     * @param
     * @return com.baomidou.mybatisplus.core.injector.ISqlInjector
     */
    @Bean
    public ISqlInjector iSqlInjector()
    {
        return new LogicSqlInjector();
    }

    /*
     * @author 吃麻椒的花酱
     * @date  2021/7/2 14:51
     * @Description 分页插件
     * @param
     * @return com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
